package com.kaifamiao.strings;

import java.util.Arrays;

/**
 * 1、测试 getChars 方法
 * 2、测试 toCharArray 方法
 */
public class StringTest9 {

	public static void main(String[] args) {
		
		char[] chars = new char[ 10 ];
		System.out.println( Arrays.toString( chars ) );
		
		String s = "云创动力·开发喵" ;
		
		s.getChars( 2 , 4 , chars,  5 );
		System.out.println( Arrays.toString( chars ) );
		
		char[] array = s.toCharArray();
		System.out.println( Arrays.toString( array ) );
		
		/*
		CharSequence cs =  s.subSequence( 5 , s.length() );
		System.out.println( cs );
		
		String sub1 =  s.substring( 5 );
		System.out.println( sub1 );
		
		String sub2 =  s.substring( 2 , 4 );
		System.out.println( sub2 );
		*/

	}

}
